﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SerialPortLibrary
{
    public interface ISerialPort:IDataPublish
    {
        long SendBytes { get; set; }
        long ReceiveBytes { get; set; }
        /// <summary>
        /// 发送超时时间 秒
        /// </summary>
        int SendTimeOut { get; set; }
        /// <summary>
        /// 接收超时时间 秒
        /// </summary>
        int ReceiveTimeOut { get; set; }
        /// <summary>
        /// 发送缓冲区大小
        /// </summary>
        int ReadBufferSize { get; set; }
        /// <summary>
        /// 接受缓冲区大小
        /// </summary>
        int WriteBufferSize { get; set; }
        /// <summary>
        /// 
        /// </summary>
        bool IsOpen { get; }
        void Send(ISerialData data);

        bool ClosePort();
        bool OpenPort();
    }
}
